<?php
/**
 * Get.php
 * Created by PhpStorm.
 * User: 江小波
 * Date: 2019/06/14
 * Time: 11:33
 */
namespace app\api\open\payment;

use app\api\open\Base;
use app\api\model\PaymentModel;
use app\common\Singleton;

class Get extends Base
{
    use Singleton;

    public function __construct($param = [])
    {
        parent::__construct($param);
    }
    
    /**
     * @param array $param
     * @return array|false|null|\PDOStatement|string|\think\Model
     * @throws \Exception
     */
    public function index($param=[])
    {
        // 获取详情
        $info = PaymentModel::getInstance()->get(['id'=>$param['id']]);
        if(empty($info['id']))
        {
            throw new \Exception("查询结果为空",1);
        }
        return $info;
    }
}